Skip to content

5.0.1-beta-4#91

Open
rajnandan1 wants to merge 1 commit intomasterfrom
5.0.1-beta-4
Open

5.0.1-beta-4#91
rajnandan1 wants to merge 1 commit intomasterfrom
5.0.1-beta-4

Conversation

@rajnandan1
Copy link
Contributor

Raising PR to github

Copilot AI review requested due to automatic review settings January 19, 2026 13:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the codebase from Python to TypeScript, converting model files from Python classes using Pydantic to TypeScript interfaces. The changes represent a complete language transition for the Cashfree Payment Gateway API SDK.

Changes:

  • Converted Python model classes to TypeScript interfaces
  • Replaced Python type annotations with TypeScript type annotations
  • Added TypeScript-specific enum declarations for constrained string types
  • Updated API initialization file to use Python-style imports

Reviewed changes

Copilot reviewed 133 out of 571 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
cashfree_pg/models/instrument_webhook_data_entity.py Converted from Python Pydantic model to TypeScript interface
cashfree_pg/models/instrument_webhook_data.py Converted from Python Pydantic model to TypeScript interface with incorrect type annotations
cashfree_pg/models/instrument_webhook.py Converted from Python Pydantic model to TypeScript interface
cashfree_pg/models/instrument_entity.py Converted from Python Pydantic model to TypeScript interface with enum definitions
cashfree_pg/models/idempotency_error.py Converted from Python Pydantic model to TypeScript interface with enum definitions
Multiple other model files Similar conversions from Python to TypeScript with type annotation changes
cashfree_pg/api/init.py New Python API initialization file added despite TypeScript migration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +31 to +40
* @type {str}
* @memberof InstrumentWebhookData
*/
'event_time'?: str;
/**
*
* @type {str}
* @memberof InstrumentWebhookData
*/
'type'?: str;
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type annotations use Python syntax str instead of TypeScript syntax. In TypeScript, the string type should be string, not str. This applies to all type annotations throughout the converted TypeScript files. Similarly, int should be number, float should be number, bool should be boolean, List[T] should be Array<T> or T[], and object can remain as is or be more specific.

Suggested change
* @type {str}
* @memberof InstrumentWebhookData
*/
'event_time'?: str;
/**
*
* @type {str}
* @memberof InstrumentWebhookData
*/
'type'?: str;
* @type {string}
* @memberof InstrumentWebhookData
*/
'event_time'?: string;
/**
*
* @type {string}
* @memberof InstrumentWebhookData
*/
'type'?: string;

Copilot uses AI. Check for mistakes.
Comment on lines +31 to +40
* @type {str}
* @memberof InstrumentWebhookData
*/
'event_time'?: str;
/**
*
* @type {str}
* @memberof InstrumentWebhookData
*/
'type'?: str;
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type annotations use Python syntax str instead of TypeScript syntax. In TypeScript, the string type should be string, not str. This applies to all type annotations throughout the converted TypeScript files. Similarly, int should be number, float should be number, bool should be boolean, List[T] should be Array<T> or T[], and object can remain as is or be more specific.

Suggested change
* @type {str}
* @memberof InstrumentWebhookData
*/
'event_time'?: str;
/**
*
* @type {str}
* @memberof InstrumentWebhookData
*/
'type'?: str;
* @type {string}
* @memberof InstrumentWebhookData
*/
'event_time'?: string;
/**
*
* @type {string}
* @memberof InstrumentWebhookData
*/
'type'?: string;

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +21
# import apis into api package
from cashfree_pg.api.customers_api import CustomersApi
from cashfree_pg.api.disputes_api import DisputesApi
from cashfree_pg.api.easy_split_api import EasySplitApi
from cashfree_pg.api.eligibility_api import EligibilityApi
from cashfree_pg.api.offers_api import OffersApi
from cashfree_pg.api.orders_api import OrdersApi
from cashfree_pg.api.pg_reconciliation_api import PGReconciliationApi
from cashfree_pg.api.payment_links_api import PaymentLinksApi
from cashfree_pg.api.payments_api import PaymentsApi
from cashfree_pg.api.refunds_api import RefundsApi
from cashfree_pg.api.settlement_reconciliation_api import SettlementReconciliationApi
from cashfree_pg.api.settlements_api import SettlementsApi
from cashfree_pg.api.simulation_api import SimulationApi
from cashfree_pg.api.subscription_api import SubscriptionApi
from cashfree_pg.api.token_vault_api import TokenVaultApi
from cashfree_pg.api.default_api import DefaultApi
from cashfree_pg.api.soft_pos_api import SoftPOSApi

Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A Python API initialization file has been added despite the PR converting the codebase to TypeScript. This file uses Python import syntax and references .py files, which is inconsistent with the TypeScript migration shown in the model files. Either this file should be converted to TypeScript (e.g., index.ts with ES6 imports/exports) or the entire migration approach needs reconsideration.

Suggested change
# import apis into api package
from cashfree_pg.api.customers_api import CustomersApi
from cashfree_pg.api.disputes_api import DisputesApi
from cashfree_pg.api.easy_split_api import EasySplitApi
from cashfree_pg.api.eligibility_api import EligibilityApi
from cashfree_pg.api.offers_api import OffersApi
from cashfree_pg.api.orders_api import OrdersApi
from cashfree_pg.api.pg_reconciliation_api import PGReconciliationApi
from cashfree_pg.api.payment_links_api import PaymentLinksApi
from cashfree_pg.api.payments_api import PaymentsApi
from cashfree_pg.api.refunds_api import RefundsApi
from cashfree_pg.api.settlement_reconciliation_api import SettlementReconciliationApi
from cashfree_pg.api.settlements_api import SettlementsApi
from cashfree_pg.api.simulation_api import SimulationApi
from cashfree_pg.api.subscription_api import SubscriptionApi
from cashfree_pg.api.token_vault_api import TokenVaultApi
from cashfree_pg.api.default_api import DefaultApi
from cashfree_pg.api.soft_pos_api import SoftPOSApi
# This package is intentionally left without Python API imports.
# The API surface has been migrated to TypeScript; this stub remains
# only to avoid import errors for legacy references.
__all__: list[str] = []

Copilot uses AI. Check for mistakes.
Comment on lines +25 to +46
* @type {List[str]}
* @memberof FetchSettlementsRequestFilters
*/
'cf_settlement_ids'?: List[str];
/**
* List of settlement UTRs for which you want the settlement reconciliation details.
* @type {List[str]}
* @memberof FetchSettlementsRequestFilters
*/
'settlement_utrs'?: List[str];
/**
* Specify the start date from when you want the settlement reconciliation details.
* @type {str}
* @memberof FetchSettlementsRequestFilters
*/
'start_date'?: str;
/**
* Specify the end date till when you want the settlement reconciliation details.
* @type {str}
* @memberof FetchSettlementsRequestFilters
*/
'end_date'?: str;
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type annotation uses Python syntax List[str] instead of TypeScript syntax. Should be Array<string> or string[].

Suggested change
* @type {List[str]}
* @memberof FetchSettlementsRequestFilters
*/
'cf_settlement_ids'?: List[str];
/**
* List of settlement UTRs for which you want the settlement reconciliation details.
* @type {List[str]}
* @memberof FetchSettlementsRequestFilters
*/
'settlement_utrs'?: List[str];
/**
* Specify the start date from when you want the settlement reconciliation details.
* @type {str}
* @memberof FetchSettlementsRequestFilters
*/
'start_date'?: str;
/**
* Specify the end date till when you want the settlement reconciliation details.
* @type {str}
* @memberof FetchSettlementsRequestFilters
*/
'end_date'?: str;
* @type {Array<string>}
* @memberof FetchSettlementsRequestFilters
*/
'cf_settlement_ids'?: Array<string>;
/**
* List of settlement UTRs for which you want the settlement reconciliation details.
* @type {Array<string>}
* @memberof FetchSettlementsRequestFilters
*/
'settlement_utrs'?: Array<string>;
/**
* Specify the start date from when you want the settlement reconciliation details.
* @type {string}
* @memberof FetchSettlementsRequestFilters
*/
'start_date'?: string;
/**
* Specify the end date till when you want the settlement reconciliation details.
* @type {string}
* @memberof FetchSettlementsRequestFilters
*/
'end_date'?: string;

Copilot uses AI. Check for mistakes.
Comment on lines +25 to +46
* @type {List[str]}
* @memberof FetchSettlementsRequestFilters
*/
'cf_settlement_ids'?: List[str];
/**
* List of settlement UTRs for which you want the settlement reconciliation details.
* @type {List[str]}
* @memberof FetchSettlementsRequestFilters
*/
'settlement_utrs'?: List[str];
/**
* Specify the start date from when you want the settlement reconciliation details.
* @type {str}
* @memberof FetchSettlementsRequestFilters
*/
'start_date'?: str;
/**
* Specify the end date till when you want the settlement reconciliation details.
* @type {str}
* @memberof FetchSettlementsRequestFilters
*/
'end_date'?: str;
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type annotation uses Python syntax List[str] instead of TypeScript syntax. Should be Array<string> or string[].

Suggested change
* @type {List[str]}
* @memberof FetchSettlementsRequestFilters
*/
'cf_settlement_ids'?: List[str];
/**
* List of settlement UTRs for which you want the settlement reconciliation details.
* @type {List[str]}
* @memberof FetchSettlementsRequestFilters
*/
'settlement_utrs'?: List[str];
/**
* Specify the start date from when you want the settlement reconciliation details.
* @type {str}
* @memberof FetchSettlementsRequestFilters
*/
'start_date'?: str;
/**
* Specify the end date till when you want the settlement reconciliation details.
* @type {str}
* @memberof FetchSettlementsRequestFilters
*/
'end_date'?: str;
* @type {Array<string>}
* @memberof FetchSettlementsRequestFilters
*/
'cf_settlement_ids'?: Array<string>;
/**
* List of settlement UTRs for which you want the settlement reconciliation details.
* @type {Array<string>}
* @memberof FetchSettlementsRequestFilters
*/
'settlement_utrs'?: Array<string>;
/**
* Specify the start date from when you want the settlement reconciliation details.
* @type {string}
* @memberof FetchSettlementsRequestFilters
*/
'start_date'?: string;
/**
* Specify the end date till when you want the settlement reconciliation details.
* @type {string}
* @memberof FetchSettlementsRequestFilters
*/
'end_date'?: string;

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants